package com.tj.collection.controller.chatter.request;

import com.kly.user.dto.chatter.Chatter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.Date;

@Data
@ApiModel(value = "chatterAddVo", description = "增加chatter请求参数")
public class ChatterRequest {
    @ApiModelProperty("chatter code")
    private String chatterCode;
    @ApiModelProperty("chatter account")
    private String account;
    @ApiModelProperty("chatter名称")
    private String nickName;
    @ApiModelProperty("在线状态：1-在线 2-离线")
    private Integer onlineStatus;
    @ApiModelProperty("绑定model数量")
    private Integer bindModelsCount;
    @ApiModelProperty("创建日期")
    private Date createDt;
    @ApiModelProperty("修改日期")
    private Date modifyDt;
    @ApiModelProperty("最后一次活跃时间")
    private Date lastActiveDate;
    @ApiModelProperty("最后一次活跃时间")
    private String lastActiveStr;
    @ApiModelProperty("工作类型：1-Full 2-PartTime")
    private Integer jobType;
    @ApiModelProperty("排班时间")
    private String workingHours;
    @ApiModelProperty("账号状态：1-disabled 2-enable")
    private Integer status;
    @ApiModelProperty("性别：1-男 2-女 3-未知")
    private Integer gender;
    @ApiModelProperty("密码")
    private String password;
    @ApiModelProperty("model code")
    private String modelUserCodes;
    @ApiModelProperty("评级：1-S 2-A 3-B")
    private Integer level;
    @ApiModelProperty("国家:巴基斯坦-PAK， 墨西哥-MX  菲律宾-PH")
    private String area;
    @ApiModelProperty("城市：Manila， 其它：Others")
    private String city;


    public static Chatter toChatter(ChatterRequest request, Long adminId) {
        Chatter chatter = new Chatter();
        BeanUtils.copyProperties(request, chatter);
        chatter.setAdminId(adminId);
        return chatter;
    }
}
